Cargo 代理配置
编辑 ~/.cargo/config 文件:
1# 将 crates-io 替换为中科大镜像
2[source.crates-io]
3registry = "https://github.com/rust-lang/crates.io-index"
4replace-with = 'ustc'
5
6[source.ustc]
7registry = "git://mirrors.ustc.edu.cn/crates.io-index"
8#registry = "https://mirrors.ustc.edu.cn/crates.io-index"
9
10# 代理配置,git 也会使用这个配置
11[http]
12proxy = "socks://localhost:7890"
13
14[https]
15proxy = "socks://localhost:7890"